<div class="pad_10">
	<div class="table-list">
		<table width="100%">
			<thead>
				<tr>
					<th width="79">序号</th>
					<th width="136">题目编号</th>
					<th width="315">题目名称</th>
					<th width="148">是否基本信息</th>
					<th width="127">题目类型</th>
					<th width="276">管理操作</th>
				</tr>
			</thead>
			<tbody>
				<{foreach $subjects as $key => $ls}>
				<tr onMouseOver="this.className = 'tr2'" onMouseOut="this.className = 'tr1'" class="tr1">
					<td align="center"><{$ls.subject_id}></td>
					<td align="center"><a href="javascript:void(0);"></a> <{$ls.question_num}> </td>
					<td align="center"><a href="javascript:void(0);"><{$ls.title}></a></td>
					<td align="center">
						<{if $ls.is_basic}>
							是
						<{else}>
							否
						<{/if}>
					</td>
					<td align="center"><{$questionType[$ls.question_type].title}></td>
					<td align="center"><a name="delete" rel="<{$ls.subject_id}>" href="javascript:void(0);">删除</a> | <a href="/webadmin/question/subjectedit?tid=<{$ls.question_type}>&qid=<{$ls.question_id}>&sid=<{$ls.subject_id}>">编辑</a></td>
				</tr>
				<{/foreach}>
			</tbody>
		</table>
		<div style="float:right;"><{$page}></div>
	</div>
</div>
	
<script type="text/javascript">
	$(function(){
		$('a[name="delete"]').click(function(){
			var subject_id = $(this).attr('rel');
			if(!parseInt(subject_id)){
				alert('请选择要删除的记录');
				return false;
			}
			var or = confirm('确定要删除吗？');
			if(or){
				$.ajax({
					type: "POST",
					async: true,
					url: '/webadmin/question/subjectdelete',
					data: {subject_id:subject_id},
					dataType: 'json',
					success: function (data) {
						alert(data.msg);
						if(data.ok){
							window.location.reload();
						}
					}
				});
			}
		});
		
	});
</script>